package com.jinlia.show.modules.wxapp.service;

import com.jinlia.show.common.core.utils.UserInfoUtils;
import com.jinlia.show.modules.base.wxapp.entity.AccessToken;
import com.jinlia.show.modules.base.wxapp.service.AccessTokenMapperService;
import lombok.RequiredArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

@Service
@RequiredArgsConstructor
public class AccessTokenService {
    @Autowired
    private AccessTokenMapperService accessTokenMapperService;
    final Logger logger = LoggerFactory.getLogger(AccessTokenMapperService.class);
    public AccessToken getAccessToken() {
        AccessToken accessToken = accessTokenMapperService.getAccessToken(UserInfoUtils.getAppId());
        return accessToken;
    }
}
